/*echo declarations
*/ 
#ifndef ECHO_H
#define ECHO_H

#ifndef WIN32
#include <kos.h>
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <arch/rtc.h>
#include <dc/pvr.h>
#include <png/png.h>
#include <jpeg/jpeg.h>
#define DBGOUT(string) printf(string)
#define O_BINARY 0
int SystemUpdate() {return 0;};
extern uint8 romdisk[];
#define ROMDISKDIR "/rd/"
#endif

#ifdef WIN32
#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
#include "../koswin/koswin.h"
#define ROMDISKDIR "rd\\"
#endif


#include <math.h>

#include "obj3d.h"
#include "agm.h"
#include "tgm.h"
#include "pgm.h"

#define VERSIONSTRING "Test 1.0 (110904)"

int maingame();
int rungame(int level,char playmovie,char showpanel,int *lives,int *score);
int runoverworld(int* level,int *lives,int *score);

//common
extern void DrawPanel(int score,int lives);
extern void DrawNumber(int amount);
#ifndef WIN32
extern void loadjpg(const char *fn, uint32 width, GLuint *txr);
#endif
extern void loadpng(const char *fn, uint32 alpha, GLuint *txr);
extern void CommonTexParams();
extern int GroundCollison(vector* R1,vector* R2,vector* R3,tgmmodel* tgm_model);
extern int Menu();


//uint32 * rtc;
extern int levelcompleted[10];
extern int levelscores[10];
extern float OWangle;
extern char OWdir;
extern char OWunlock;
extern GLuint texletters;
extern cont_cond_t cond;
extern uint8	c;


extern agmmodel mod_echo,mod_sky;
extern tgmmodel mod_ground;


//time_t curtime,oldtime;
extern int button;
extern int sound_jump,sound_land,sound_walk;
extern int sound_bumpup,sound_bumpbox;

extern int inactivetime,blinkcount;
extern int score,lives,loadlevel;

extern vector vecNorm;

extern GLuint	tex_echo,tex_echoblink,tex_bg,tex_sky,tex_ground[8],tex_panel;



#endif
